{/* LAYOUT模板 */}
	<layout name="layout"/>
{/* LAYOUT模板 */}
{/* import Js,Css */}
	<js href="__PUBLIC__/js/admin/listTable.js"/>
	<js href="__PUBLIC__/js/admin/js.util.js"/>
	<css href="__PUBLIC__/css/admin/common.css"/>
	<js href="__PUBLIC__/js/admin/js.selectzone.js"/>
	
	<css href="__PUBLIC__/css/jquery-ui.css" />
	<js href="__PUBLIC__/js/core/jquery-ui.1.10.4.js" />
	<js href="__PUBLIC__/js/core/plugins.js"/>
{/* import js,css */}
<!-- [position] -->
	<include file="Template:position"/>
<!-- [position] -->

<form method="post" action="" name="listForm">
	<div class="list-div" id="listDiv">
	<table cellpadding="3" cellspacing="1" width="100%">
		<tr>
			<th><a href="javascript:listTable.sort('type_name'); ">类型名称</a>{$sort_type_name}</th>
			<th><a href="javascript:listTable.sort('send_type'); ">发放类型</a>{$sort_send_type}</th>
			<th><a href="javascript:listTable.sort('type_money'); ">红包金额</a>{$sort_type_money}</th>
			<th><a href="javascript:listTable.sort('min_amount'); ">订单下限</a>{$sort_min_amount}</th>
			<th>发放数量</th>
			<th>使用数量</th>
			<th>操作</th>
		</tr>
		<volist name="type_list" id="type">
		<tr>
			<td class="first-cell">
				<span onclick="listTable.edit(this, 'edit_type_name', {$type.type_id})">{$type.type_name}</span>
			</td>
			<td>{$type.send_by}</td>
			<td align="right">
				<span onclick="listTable.edit(this, 'edit_type_money', {$type.type_id})">{$type.type_money}</span>
			</td>
			<td align="right">
				<span onclick="listTable.edit(this, 'edit_min_amount', {$type.type_id})">{$type.min_amount}</span>
			</td>
			<td align="right"><span>{$type.send_count}</span></td>
			<td align="right">{$type.use_count}</td>
			<td align="right">
				<if condition="$type['send_type'] eq 3">
				<a href="bonus.php?act=gen_excel&tid={$type.type_id}">报表</a> |
				</if>
				<if condition="$type['send_type'] neq 2">
					<a href="__URL__/send_bonus?id={$type.type_id}&send_by={$type.send_type}">发放</a> |
				</if>
				<a href="__URL__/bonus_list?bonus_type={$type.type_id}">查看</a> |
				<a href="__URL__/mod_bonus_type?type_id={$type.type_id}">编辑</a> |
				<a href="__URL__/remove_bonus_type?id={$type.type_id}" onclick="listTable.remove({$type.type_id}, '确定删除')">移除</a></span>
			</td>
		</tr>
		</volist>
	</table>
	</div>
</form>


<script type="text/javascript" language="JavaScript">
	onload = function(){
		// 开始检查订单
		//startCheckOrder();
	}
</script>
